﻿namespace Wedn.Model.Data
{
    /// <summary>
    /// 选项设置表模型类(初步审核通过)
    /// </summary>
    public class Option
    {
        #region 所有字段
        private int id;
        private string name;
        private string value;
        private bool isEnable;
        private string description;
        #endregion

        #region 对外公共属性
        /// <summary>
        /// 主键(自增长)字段
        /// </summary>
        public int Id
        {
            get { return id; }
            set { id = value; }
        }
        /// <summary>
        /// 选项名称字段
        /// </summary>
        public string Name
        {
            get { return name; }
            set { name = value; }
        }
        /// <summary>
        /// 选项设置值字段
        /// </summary>
        public string Value
        {
            get { return this.value; }
            set { this.value = value; }
        }
        /// <summary>
        /// 选项是否启用字段
        /// </summary>
        public bool IsEnable
        {
            get { return isEnable; }
            set { isEnable = value; }
        }
        /// <summary>
        /// 选项描述说明字段
        /// </summary>
        public string Description
        {
            get { return description; }
            set { description = value; }
        } 
        #endregion

        #region 构造函数
        public Option() { }
        /// <summary>
        /// 选项设置表模型类构造函数
        /// </summary>
        /// <param name="name">选项名称</param>
        /// <param name="value">选项设置值</param>
        public Option(string name, string value) : this(0, name, value, true, null) { }
        /// <summary>
        /// 选项设置表模型类构造函数
        /// </summary>
        /// <param name="id">选项ID</param>
        /// <param name="name">选项名称</param>
        /// <param name="value">选项设置值</param>
        /// <param name="isEnable">选项是否启用</param>
        /// <param name="description">选项描述说明</param>
        public Option(int id, string name, string value, bool isEnable, string description)
        {
            this.id = id;
            this.name = name;
            this.value = value;
            this.isEnable = isEnable;
            this.description = description;
        } 
        #endregion
    }
}
